/**
 * Copyright (c) 2012-2018 Red Hat, Inc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Red Hat, Inc. - initial API and implementation
 */
@eval primaryButtonBackground org.eclipse.che.ide.api.theme.Style.theme.getPrimaryButtonBackground();
@eval buttonBackground org.eclipse.che.ide.api.theme.Style.theme.getButtonBackground();
@eval partBackground org.eclipse.che.ide.api.theme.Style.theme.partBackground();
@eval outputBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.outputBackgroundColor();

.onoffswitch {
    position: relative;
    width: 50px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.onoffswitchCheckbox {
    display: none;
}

.onoffswitchLabel {
    display: block;
    overflow: hidden;
    cursor: pointer;
    width: 50px;
    height: 18px;
    background-color: outputBackgroundColor;
}

.onoffswitchInner {
    width: 200%;
    margin-left: -100%;
    transition: margin 0.2s ease-in;
}

.onoffswitchInner:before, .onoffswitchInner:after {
    float: left;
    width: 50%;
    height: 20px;
    padding: 0;
    line-height: 20px;
    font-size: 9px;
    color: white;
    font-family: mainFontFamily;
    font-weight: bold;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.onoffswitchInner:before {
    content: "YES";
    padding-left: 5px;
    color: primaryButtonBackground;
}

.onoffswitchInner:after {
    content: "NO";
    padding-right: 8px;
    color: #999999;
    text-align: right;
}

.onoffswitchSwitch {
    width: 21px;
    height: 12px;
    margin: -0.5px;
    background: buttonBackground;
    position: absolute;
    top: 3px;
    right: 26px;
    transition: all 0.2s ease-in;
}

.onoffswitchCheckbox:checked + .onoffswitchLabel .onoffswitchInner {
    margin-left: 0;
}

.onoffswitchCheckbox:checked + .onoffswitchLabel .onoffswitchSwitch {
    right: 4px;
    background: primaryButtonBackground;
}
